package cn.thank.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.thank.service.IUserService;

@Controller
@RequestMapping(value = "/user")
public class UserController {

	
	@Autowired
	private IUserService userService;
	
	@RequestMapping(value = "/index")
	public String init(Model model){
		return "user/index";
	}
	
	@RequestMapping(value = "/add")
	public String add(Model model){
		int responsetime = userService.add();
		System.out.println(responsetime+"====");
		return "user/add";
	}
	
	@RequestMapping(value = "/update")
	public String update(Model model){
		int responsetime =  userService.update();
		return "user/update";
	}
}
